package com.cskaoyan.service;

import com.cskaoyan.bean.MarketRegion;
import com.cskaoyan.bean.vo.RegionVo;
import com.cskaoyan.mapper.MarketRegionMapper;
import com.cskaoyan.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author Ramsey
 * @date 2023年05月28日 21:53
 */
public class AdminRegionServiceimpl implements AdminRegionService {
    @Override
    public List<RegionVo> selectAll() {
        SqlSession sqlSession = MyBatisUtil.getSqlSession();
        MarketRegionMapper mapper = sqlSession.getMapper(MarketRegionMapper.class);
        List<RegionVo> marketRegions = mapper.selectAll();
        return marketRegions;
    }
}
